package com.zxl.cityservice.service.impl;

import com.zxl.cityservice.dao.BaseMapper;
import com.zxl.cityservice.service.BaseService;

import java.util.List;
import java.util.Map;

/**
 * Created by xiaolinzhang on 2017/2/7.
 */
public abstract class BaseServiceImpl<T> implements BaseService<T> {

    public abstract BaseMapper<T> baseMapper();

    public Long save(T t) {
        return baseMapper().save(t);
    }

    public void del(Long id) {
        baseMapper().del(id);
    }

    public void update(T t) {
        baseMapper().update(t);
    }

    public T getOneRes(Map map){
        return baseMapper().getOneRes(map);
    }

    public List<T> getAll(Integer offset,Integer rows){
        return baseMapper().getAll(offset,rows);
    }

}
